import math

for i1 in range(1, 10, 1):
    for i2 in range(10):
        for i3 in range(10):
            if math.pow(i1, 3) + math.pow(i2, 3) + math.pow(i3, 3) == i1 * 100 + i2 * 10 + i3:
                if i1 == 4:
                    print(str(i1 * 100 + i2 * 10 + i3), end="")
                else:
                    print(str(i1 * 100 + i2 * 10 + i3) + ", ", end="")
